/*
 * File: mul_usu32_sat.c
 *
 * Code generated for Simulink model 'FLTM'.
 *
 * Model version                  : 3.153
 * Simulink Coder version         : 9.4 (R2020b) 29-Jul-2020
 * C/C++ source code generated on : Mon Aug  2 13:13:30 2021
 */

#include "rtwtypes.h"
#include "mul_wide_su32.h"
#include "mul_usu32_sat.h"

uint32_T mul_usu32_sat(int32_T a, uint32_T b)
{
    uint32_T result;
    uint32_T u32_chi;
    mul_wide_su32(a, b, &u32_chi, &result);
    if ((int32_T)u32_chi >= 0)
    {
        if (u32_chi)
        {
            result = MAX_uint32_T;
        }
    }
    else
    {
        result = 0U;
    }

    return result;
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
